
<h1>Log in</h1>
<p>Please log in here</p>
<form id="loginform" name="loginform" method="post" action="<?php echo $this->url(array('module'=>'default','controller'=>'auth','action'=>'identify'));?>">
	<div>
	<label>Email : </label>
	<input type="text" name="username" value="" />
	</div>
	<div>
	<label>Mote de passe :</label>
	<input type="password" name="password" value="" />
	</div>
	<?php if(isset($this->error)):?>
	<div style="color: red;"><?php echo $this->escape(current($this->error));?></div>
	<?php endif;?>
	<div>
	<input type="submit" name="login" value="login" />
	</div>
</form>
<?php echo $this->headScript()->appendFile('/js/jquery.validate.min.js','text/javascript');?>
<script type="text/javascript">
$(window).ready(function(){
	$("#loginform").validate({
		rules:{
			username:{required:true},
			password:{required:true}
		}
	});
});
</script>